home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / modula2f.zip / GRAPHICS.DEF < prev    next >
Text File  |  1992-05-01  |  2KB  |  52 lines

  1. (* Graphics   BIOS Graphics   1991   Chris Harshman
  2.    This Module was designed to give CGA and EGA graphics commands to
  3.    Fitted Software Tools Modula-2 compiler.  Included are Procedures to
  4.    set video mode, draw a dot, box, or circle, and a function to return
  5.    the color of a point on the screen *)
  6.  
  7. DEFINITION MODULE Graphics;
  8.  
  9.  PROCEDURE SetCga320;
  10.     (* Sets screen mode to 320x200 4 color graphics *)
  11.  
  12.  PROCEDURE SetCgaMono;
  13.     (* Sets screen mode to 640x200 2 color graphics *)
  14.  
  15.  PROCEDURE SetEga320;
  16.     (* Sets screen mode to 320x200 16 color graphics *)
  17.  
  18.  PROCEDURE SetEga640;
  19.     (* Sets screen mode to 640x200 16 color graphics *)
  20.  
  21.  PROCEDURE SetPlus;
  22.     (* Sets screen mode to 640x350 16 color graphics on EGA boards or
  23.        to 640x200 16 color graphics on Leading Edge computers *)
  24.  
  25.  
  26.     (* color can be in the range 0-3 for CGA and 0-15 for EGA.  Coordinates
  27.        are from 0 to the specified range -1 *)
  28.  
  29.  PROCEDURE SetTandy;
  30.     (* Sets screen mode to 320x200 16 color graphics on Tandy or PCjr *)
  31.  
  32.  PROCEDURE SetBackground(color:INTEGER);
  33.     (* Sets the background color for graphics screens.  Can also be used to
  34.        change the border on text screens. *)
  35.  
  36.  PROCEDURE Dot(color,xloc,yloc:INTEGER);
  37.     (* Puts a dot of color on the screen at the specified x,y coordinates *)
  38.  
  39.  PROCEDURE Box(color,x1,y1,x2,y2:INTEGER);
  40.     (* Frame a box of color from coord x1,y1 to x2,y2 *)
  41.  
  42.  PROCEDURE Circle(color,xloc,yloc,rad:INTEGER);
  43.     (* Draws an elipse with center xloc,yloc of color with radius rad *)
  44.  
  45.  PROCEDURE Look(xloc,yloc:INTEGER):INTEGER;
  46.     (* Returns the color of the given coordinates *)
  47.  
  48.  PROCEDURE Clear;
  49.     (* Clears the screen, slower than Cls FROM Text *)
  50.  
  51. END Graphics.
  52.